package com.green.configfile.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

//通过这种方式的话，这个类中就不能有其他方法
@Data
@Configuration
@ConfigurationProperties(prefix = "person")
public class PersonConfig {

    private String name;
    private Integer age;
    private String idCard;
    private String[] hobby;

//    public void getInfo() {
//        System.out.println("name:" + name);
//        System.out.println("age:" + age);
//        System.out.println("idCard:" + idCard);
//        System.out.println("hobby:" + hobby);
//    }

}
